package com.neo.push.server.mongo;

import com.neo.push.core.RegisterMessage;
import com.neo.push.core.connection.ConnectionListener;
import com.neo.push.core.connection.SocketConnection;
import com.neo.push.server.connection.BaseConnectionMonitor;

/**
 * Created by lock on 17-8-1.
 */
public class MongoConnectionMonitor extends BaseConnectionMonitor {

    private ConnectionListener connectionListener;


    @Override
    public void register(SocketConnection connection, RegisterMessage registerMessage) {
        super.register(connection, registerMessage);
        connectionListener.register(connection,registerMessage);
    }

    @Override
    public void closed(SocketConnection connection) {
        super.closed(connection);
        connectionListener.closed(connection);
    }


    public void setConnectionListener(ConnectionListener connectionListener) {
        this.connectionListener = connectionListener;
    }
}
